package one.stand.mapper;

import one.stand.model.DynamicModel;
import one.stand.model.essay.DynamicCompanyModel;
import one.stand.model.live.WxShareDynamicModel;
import one.stand.request.essay.DynamicQuery;
import one.stand.request.essay.VisitorsDetailQuery;
import one.stand.response.essay.DynamicModelResponse;

import java.util.List;

/**
 * @author Administrator
 */
public interface DynamicMapper {
    int deleteByPrimaryKey(Integer dynamicId);

    int insert(DynamicModel record);

    int insertSelective(DynamicModel record);

    DynamicModel selectByPrimaryKey(Integer dynamicId);

    List<DynamicModel> select(DynamicModel record);

    int updateByPrimaryKeySelective(DynamicModel record);

    int updateByPrimaryKey(DynamicModel record);

//    int delDynamic(DynamicModel record);

    Integer getCreateUserId(Integer dynamicId);

    List<DynamicCompanyModel> queryDynamicData(DynamicQuery request);

    DynamicCompanyModel queryDynamicVisitors(VisitorsDetailQuery request);

    /**
     * 按公司查询文章
     * @param companyId
     * @return
     */
    List<DynamicModelResponse> queryCompanyDynamics(Integer companyId);

    Integer queryDynamic(Long id);

    /**
     * 用户最后分享的动态
     * @param openId
     * @return
     */
    WxShareDynamicModel selectQueryUserShareLast(String openId);

    int updateShareNum(DynamicModel dynamicModel);
}
